<include file="Common:header" />
<css file="__PUBLIC__/css/redmond/jquery-ui-1.10.0.custom.css"/>
<js file="__PUBLIC__/js/jquery-1.8.2.min.js" /> 
<js file="__PUBLIC__/js/jquery-ui-1.10.0.custom.min.js"/>
<css file="__PUBLIC__/Admin/css/addGoods.css" />
<script type='text/javascript'>
    window.UEDITOR_HOME_URL = '__PUBLIC__/ueditor/';
</script>
<js file='__PUBLIC__/ueditor/editor_config.js'/>
<js file='__PUBLIC__/ueditor/editor_all_min.js'/>
<css file="__PUBLIC__/uploadify/uploadify.css" />
<js file="__PUBLIC__/uploadify/jquery.uploadify.min.js" />
<script>
    $(function() {
        $( "#tabs" ).tabs();
    });
     var goodsListPath = '{:U('index')}';
     var getAttrUrl = '{:U('getAttr')}';
     var buttonImage = '__PUBLIC__/uploadify/uploadButton.png';
     var swf = '__PUBLIC__/uploadify/uploadify.swf';
     var listImgUploader = '{:U("Common/uploadListImg")}';
     var goodsImgUploader = '{:U("Common/uploadGoodsImg")}';
     var session_id = '<?php echo session_id();?>';
     var listImgPath = '__ROOT__/Uploads/ListImgs/';
     var goodsImgPath = '__ROOT__/Uploads/GoodsImgs/';
</script>
<js file="__PUBLIC__/Admin/js/addGoods.js" />
</head>
<body>
    <form action="{:U('runAddGoods')}" method="post">
            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1">添加商品</a></li>
                </ul>
                <div id="tabs-1">
                    <table class="table2">
                        <tr>
                            <td width="75">商品名称</td>
                            <td>
                                <input type="text" class="w200" name="goodsname"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td>所属商品分类</td>
                            <td>
                                <select name="cid" >
                                     <option value="noselect">--请选择--</option>
                                    <foreach name="category" item="val">
                                        <option value="{$val.id}" pid="{$val.pid}" tid="{$val.tid}">{$val.html}{$val.name}</option>
                                    </foreach>
                                </select>
                                <span class="ermsg"></span>
                            </td>
                        </tr>
                        <tr>
                            <td>所属商品品牌</td>
                            <td>
                                <select name="bid" >
                                    <option value="noselect">--请选择--</option>
                                    <foreach name="brands" item="val">
                                        <option value="{$val.id}">{$val.name}</option>
                                    </foreach>
                                </select>
                            </td>
                        </tr>
                        <tr>
                            <td width="75">市场价格</td>
                            <td>
                                <input type="text" class="w200" name="mprice"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td width="75">商城价格</td>
                            <td>
                                <input type="text" class="w200" name="sprice"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td width="75">单位</td>
                            <td>
                                <input type="text" class="w200" name="unit"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td width="75">商品总库存</td>
                            <td>
                                <input type="text" class="w200" name="inventory"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td width="75">点击率</td>
                            <td>
                                <input type="text" class="w200" name="clicksum"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                        <tr>
                            <td width="75">商品货号</td>
                            <td>
                                <input type="text" class="w200" name="gnumber"/> <span class="desc_n"></span>
                            </td>
                        </tr>
                    </table>
                    <!-- 商品属性列表 -->
                    <table class="table2 attr">
                    </table>
                    <!-- 商品规格列表 -->
                    <table class="table2 spec">
                    </table>
                    <!-- 商品图册 -->
                    <table class="table2 goodsimgs">
                        <tr>
                            <td width="75"><font color="#6EA7D1" size="3"><b>商品图册</b></font></td>
                            <td></td>
                        </tr>
                        <tr>
                            <td>商品列表图</td>
                            <td>
                                <input type="file" name="listimg" id="listimg">
                                <div id="listimgshow" style="display:none;">
                                    <img src=""  width="150" alt="" title="">
                                    <input type="hidden" name="listpic" value="">
                                </div>
                            </td>
                        </tr>
                         <tr>
                            <td>商品展示图</td>
                            <td>
                                <input type="file" name="goodsimg" id="goodsimg">
                                <div id="goodsimgshow" style="display:none;">
                                </div>
                                <div id="goodsimgspath"></div>
                            </td>
                        </tr>
                    </table>
                    <!-- 商品详细信息 -->
                    <table class="table2 goodsintroduce"> 
                        <tr>
                            <td><font color="#6EA7D1" size="3"><b>商品介绍</b></font><span class="addgoodsintroducebtn"><a href="javascript:void(0)">[+]添加商品介绍信息</a></span></td>
                        </tr>
                        <tr>
                            <td class="giueditshow" >
                                <textarea name="goodsintroduce" id="goodsintroduce"></textarea>
                                <script type="text/javascript">
                                window.UEDITOR_CONFIG.initialFrameWidth = '100%';
                                window.UEDITOR_CONFIG.initialFrameHeight = 300;
                                window.UEDITOR_CONFIG.imageUrl = "{:U('Common/intro')}";
                                window.UEDITOR_CONFIG.imagePath = "__ROOT__/Uploads/intro/";
                                UE.getEditor('goodsintroduce');
                                </script>
                            </td>
                        </tr>
                    </table>
                    <!-- 售后服务信息 -->
                    <table class="table2 aftersale"> 
                        <tr>
                            <td width="75"><font color="#6EA7D1" size="3"><b>售后服务</b></font><span class="addaftersalebtn"><a href="javascript:void(0)">[+]添加商品售后服务</a></span></td>
                        </tr>
                        <tr>
                            <td class="asueditshow" >
                                <textarea name="aftersale" id="aftersale"></textarea>
                                <script type="text/javascript">
                                window.UEDITOR_CONFIG.initialFrameWidth = '100%';
                                window.UEDITOR_CONFIG.initialFrameHeight = 300;
                                window.UEDITOR_CONFIG.imageUrl = "{:U('Common/intro')}";
                                window.UEDITOR_CONFIG.imagePath = "__ROOT__/Uploads/intro/";
                                UE.getEditor('aftersale');
                                </script>
                            </td>
                        </tr>
                    </table>
                </div>
                <div>
                    <input type="hidden" name="tid" value="">
                    <input type="submit" class="bt1" value="添加商品"/>
                    <input type="button" name="baclist" class="bt1" value="返回商品列表"/>
                </div>
            </div>

        </form>
</body>
</html>